<div id="Committing-to-a-branch"></div>
<div class="header">
<p>
 &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

===== Committing to a branch =====

You can commit to a branch revision (one that has an
even number of dots) with the &lsquo;<code>-r</code>&rsquo; option.  To
create a branch revision, use the &lsquo;<code>-b</code>&rsquo; option
of the <code>rtag</code> or <code>tag</code> commands
(see [[cvs: Branching and merging#Branching and merging|Branching and merging]]).  Then, either <code>checkout</code> or
<code>update</code> can be used to base your sources on the
newly created branch.  From that point on, all
<code>commit</code> changes made within these working sources
will be automatically added to a branch revision,
thereby not disturbing main-line development in any
way.  For example, if you had to create a patch to the
1.2 version of the product, even though the 2.0 version
is already under development, you might do:

<div class="example" style="margin-left: 3.2em">
 $ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module
 $ cvs checkout -r FCS1_2_Patch product_module
 $ cd product_module
 <nowiki>[[</nowiki> hack away <nowiki>]]</nowiki>
 $ cvs commit
</div>

This works automatically since the &lsquo;<code>-r</code>&rsquo; option is
sticky.

This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
